// components/my-mineService/my-mineService.js
import { createStoreBindings, storeBindingsBehavior } from 'mobx-miniprogram-bindings'
import {store} from '../../store/store'
Component({
  behaviors:[storeBindingsBehavior],
  storeBindings:{
    store,
    fields:{
      isNavToTrade:'isNavToTrade'
    },
    actions:{
      updateNum1:"updateNum1"
    }
  },
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    isClick:true,
    lis:[
      {id:1,src:"/images/minePublishPaid mutual assistance.png",text:"有偿互助"},
      {id:2,src:"/images/minePublishInterest group.png",text:"兴趣组团"},
      {id:3,src:"/images/minePublishLost and found.png",text:"失物招领"},
      {id:4,src:"/images/minePublishSecond-hand transaction.png",text:"二手交易"},
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    functionsNav(e){
      console.log(e.target.dataset.id);
      if(e.target.dataset.id===4){
       this.updateNum1(this.data.isClick)
      }
      else if(e.target.dataset.id===3){
        wx.navigateTo({
          url: '/pkgInnerLAndF/pages/LAndF/LAndFIndex/LAndFIndex',
        })
      }
    }
  }
})
